package game.com;

import android.app.Activity;
import android.os.Bundle;
import android.util.Log;
import android.view.WindowManager;

import java.io.File;


public class GameActivity extends Activity {

     GL2JNIView mView;

    @Override protected void onCreate(Bundle icicle) {
        super.onCreate(icicle);
		CreateData();
        mView = new GL2JNIView(getApplication());
	setContentView(mView);
    }

    @Override protected void onPause() {
        super.onPause();
        mView.OnPauseGame();		
    }

    @Override protected void onResume() {
        super.onResume();
        mView.OnResumeGame();		
    }
	
	public void CreateData () {
		GameResource gameResource = new GameResource(getResources());
		gameResource.initResource();
		try {					
			gameResource.mapResource("Menu.png");
			gameResource.mapResource("Menu.sprite");
			gameResource.mapResource("Menu_default.png");
			gameResource.mapResource("Menu_default.sprite");
			gameResource.mapResource("fShader.fsh");
			gameResource.mapResource("vShader.vsh");
			gameResource.mapResource("fShaderCube.fsh");
			gameResource.mapResource("vShaderCube.vsh");
			
			// Intent intent = new Intent(this, GameActivity.class);
			// startActivity(intent);
			
		} catch (Exception e) {
			e.printStackTrace();
			// System.out.println("A SD Card is required to play this game...");
		}
	}
}

